Skip to content

support async_cmd_discard()#8

Merged
wokron merged 2 commits into
masterfrom
support-cmd-discard
Jan 10, 2026
Merged

support async_cmd_discard()#8
wokron merged 2 commits into
masterfrom
support-cmd-discard

Conversation

@wokron
Copy link
Copy Markdown
Member

@wokron wokron commented Jan 9, 2026

No description provided.

@wokron wokron force-pushed the support-cmd-discard branch from 223fe1c to 35b9339 Compare January 10, 2026 03:20
@wokron wokron marked this pull request as ready for review January 10, 2026 03:26
@wokron wokron requested a review from Copilot January 10, 2026 03:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for the async_cmd_discard() operation, which wraps the io_uring_prep_cmd_discard function from liburing 2.8+. This allows async discard operations on block devices.

Changes:

  • Added async_cmd_discard() function in the async operations API
  • Implemented BlkDevice helper class for creating loop devices in tests
  • Added comprehensive test coverage with both basic and fixed fd test cases

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
include/condy/async_operations.hpp Added async_cmd_discard() function with proper version guard (>= 2.8) following the same pattern as similar operations like async_ftruncate
tests/test_async_operations.cpp Added BlkDevice helper class for test setup and two test cases (basic and fixed fd) that validate the new async_cmd_discard operation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_async_operations.cpp
Comment thread tests/test_async_operations.cpp
@wokron wokron force-pushed the support-cmd-discard branch from 35b9339 to 1bba898 Compare January 10, 2026 03:33
@wokron wokron force-pushed the support-cmd-discard branch from 1bba898 to 20b4c8a Compare January 10, 2026 03:36
@wokron wokron merged commit 3843069 into master Jan 10, 2026
11 checks passed
@wokron wokron deleted the support-cmd-discard branch January 10, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants